<template>
  <!-- <div>{{ name }}</div>
  <div>{{ content }}</div>
  <button @click="add">增加</button>
  <button @click="pre">减少</button>
  <button @click="setname('jack')">更改</button> -->
  <ul>
    <template v-for="item in $store.state.text" :key="item.id">
      <li>{{ item.content }}</li>
    </template>
  </ul>
</template>

<!-- <script>
import { mapState, mapMutations } from "vuex";
export default {
  computed: {
    ...mapState(["name", "content"]),
  },
  methods: {
    // ...mapMutations(["add", "pre", "setname"]),
  },
   created() {
      this.$store.dispatch("getTextAction");
    },
};
</script> -->
<script setup>
import { useStore } from "vuex";

const store = useStore();
store.dispatch("getTextAction");
</script>

<style lang="scss" scoped></style>
